import React from "react";
import ReactDom from "react-dom";
import Li from "./Li"

class List extends React.Component{
  constructor(props){
    super(props);
  }

  render(){

    const articles = this.props.articles;
    const lis = articles.map(article=><Li title={article.title} content={article.content} />);
    return <ul>
    {lis}
    </ul>
  }
}
const arts = [
  {
    title:"h111111111111",
    content:"c11111111111111"
  },
  {
    title:"h222222222222",
    content:"c22222222222222"
  },
  {
    title:"h111111111111",
    content:"c11111111111111"
  },
  {
    title:"h111111111111",
    content:"c11111111111111"
  }
];
ReactDom.render(<List articles={arts} />,document.body);
